x86/pv: Deprecate support for paging out the LDT
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 3 Oct 2017 10:18:37 +0000 (11:18 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 30 Aug 2018 12:38:43 +0000 (13:38 +0100)
commitf04955e18502035121776f6e09d83ae5a36c773c
tree5c67aeabbcbca4ddd56834851e71cac14233003b
parentfc5e7213f4f84b28c0557c8dbe16573f76932866
x86/pv: Deprecate support for paging out the LDT

This code is believed to be vestigial remnant of the PV Windows XP port.  It
is not used by Linux, NetBSD, Solaris or MiniOS.  Furthermore the
implementation is incomplete; it only functions for a present => not-present
transition, rather than a present => read/write transition.

The for_each_vcpu() is one scalability limitation for PV guests, which can't
reasonably be altered to be continuable.  Most importantly however, is that
this only codepath which plays with descriptor frames of a remote vcpu.

A side effect of dropping support for paging the LDT out is that the LDT no
longer automatically cleans itself up on domain destruction.  Cover this by
explicitly releasing the LDT frames at the same time as the GDT frames.

Finally, leave some asserts around to confirm the expected behaviour of all
the functions playing with PGT_seg_desc_page references.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/Kconfig
xen/arch/x86/domain.c
xen/arch/x86/mm.c
xen/arch/x86/pv/descriptor-tables.c
xen/arch/x86/pv/domain.c
xen/arch/x86/pv/mm.c
xen/include/asm-x86/domain.h